package com.chengqs.rainbow.im.security.code;

import com.chengqs.rainbow.common.security.constant.SecurityConstants;
import lombok.Getter;

/**
 * <B>主类名称：</B>Code<BR>
 * <B>概要说明：</B>enter<BR>
 *
 * @author: chengqs
 * @create: 2025-09-15 21:08:21
 **/
@Getter
public class Code {

    private final String code;

    private final int expiresIn;

    public Code(String code, int expiresIn) {
        this.code = code;
        this.expiresIn = expiresIn;
    }

    public enum Type {
        CAPTCHA {
            @Override
            public String toString() {
                return SecurityConstants.PARAM_CAPTCHA;
            }
        },

        SMS {
            @Override
            public String toString() {
                return SecurityConstants.PARAM_SMS;
            }
        }
    }
}
